{extend name="public:base" /}
{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight" xmlns="http://www.w3.org/1999/html">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <form method="get">
                        <div class="row">
                            <div class="col-sm-3">
                                <input placeholder="印章名称" value="{$params['name']}" name="name" type="text"
                                       autocomplete="off"
                                       class="form-control form-control-sm">
                            </div>
                            <div class="col-sm-3">
                                <input placeholder="设备编号" value="{$params['number']}" name="number" type="text"
                                       autocomplete="off"
                                       class="form-control form-control-sm">
                            </div>
                            <div class="col-sm-2">
                                <div class="input-group">
                                    <select class="form-control m-b" name="seal_type">
                                        <option value="" {if condition="!$params.seal_type"} selected {/if}>所有</option>
                                        {volist name="sealTypes" id="entity"}
                                        <option value="{$entity.id}"
                                                {eq name="entity.id" value="$params.seal_type"} selected {/eq}
                                        >{$entity.name}</option>
                                        {/volist}
                                    </select>
                                    <span class="input-group-append">
                                    <button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i> 搜索 </button>
                                </span>
                                </div>
                            </div>
                        </div>
                    </form>
                    <table class=" table table-stripped toggle-arrow-tiny">
                        <thead>
                        <tr>
                            <th>设备编号</th>
                            <th data-sort-ignore="true">印章名称</th>
                            <th data-sort-ignore="true">印章类型</th>
                            <th data-sort-ignore="true">收到日期</th>
                            <th data-sort-ignore="true">过期日期</th>
                            <th data-sort-ignore="true">备注</th>
                            <th data-sort-ignore="true">状态</th>
                            <th data-sort-ignore="true">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {notempty name="list"}
                        {volist name="list" id="vo"}
                        <tr>
                            <td>{$vo.number}</td>
                            <td>{$vo.name}</td>
                            <td>{$vo.seal_type_txt}</td>
                            <td>{$vo.date_received_txt}</td>
                            <td>{$vo.expired_time_txt}</td>
                            <td>{$vo.remark}</td>
                            <td>{$vo.status_txt}</td>
                            <td class="project-actions">
                                <a href="{:url('settingApproval')}?sealId={$vo.id}" class="btn btn-primary btn-sm"><i
                                        class="fa fa-cogs"></i> 设置审批流程 </a>
                            </td>
                        </tr>
                        {/volist}
                        {/notempty}
                        </tbody>
                    </table>
                    {$list->render()}
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
{/block}